import { Schema, Types, model } from 'mongoose'
import { showDayTime } from '../utils/util'
import dayjs from 'dayjs'
// gpt会话
const GptDialogSchema = new Schema(
  {
    user_id: {
      type: Types.ObjectId,
      ref: 'GptUser'
    },
    robot_id: {
      type: Types.ObjectId,
      ref: 'GptRobot'
    },
    title: {
      type: String,
      default: '未命名会话'
    },
  },
  { versionKey: false, timestamps: true }
)

export default model('GptDialog', GptDialogSchema, 'gpt_dialogs')
